
package base;

import java.util.*;

/**
 * this class is used to store the information of a product.
 * @author FlowerYang
 */
public class Product {

    private String code;

    private String description;

    private double price;

    private int number;

    /**
     * default constructor
     */
    public Product(String code,String description,double price,int number) {
        this.code=code;
        this.description=description;
        this.price=price;
        this.number=number;
    }

    /**
     * set Code
     * @param code
     */
    public void setCode(String code) {
        this.code=code;
    }

    /**
     * set Description
     * @param description
     */
    public void setDescription(String description) {
        this.description=description;
    }

    /**
     * set Price
     * @param price
     */
    public void setPrice(double price) {
        this.price=price;
    }

    /**
     * show Product
     */
    public void showProduct() {
        System.out.println(code+" "+price+" "+description);
    }

    /**
     * get Code
     */
    public String getCode() {
        return code;
    }

    public int getNumber(){
        return number;
    }
}